//
//  PaySuccessViewController.m
//  ForestPack
//
//  Created by 郑洲 on 2018/7/19.
//  Copyright © 2018年 郑洲. All rights reserved.
//

#import "PaySuccessViewController.h"
#import "OrderListViewController.h"

@interface PaySuccessViewController ()

@end

@implementation PaySuccessViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"支付详情";
    
    [self setUI];
    
    [self setLeftButton:ImageWithName(@"返回白色") title:nil target:self action:@selector(back)];
}

- (void)back {
    [self.navigationController popToRootViewControllerAnimated:YES];
}

- (void)setUI {
    UILabel *noteTitle = [[UILabel alloc] initWithFrame:CGRectMake(0, ScreenX375(29), SCREEN_WIDTH, ScreenX375(30))];
    noteTitle.text = @"购买成功";
    noteTitle.textColor = REXADECIMALCOLOR(@"#333333");
    noteTitle.font = Kfont(18);
    noteTitle.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:noteTitle];
    
    UIImageView *noteImage = [[UIImageView alloc] initWithFrame:CGRectMake((SCREEN_WIDTH - ScreenX375(248)) / 2, ScreenX375(45), ScreenX375(248), ScreenX375(248))];
    noteImage.image = [UIImage imageNamed:@"成功"];
    [self.view addSubview:noteImage];
    
    UILabel *noteDetail = [[UILabel alloc] initWithFrame:CGRectMake(0, ScreenX375(268), SCREEN_WIDTH, ScreenX375(45))];
    noteDetail.text = @"设计师001将在半小时内与您联系\n请时刻关注您的手机和QQ信息";
    noteDetail.textColor = ThemeColor;
    noteDetail.textAlignment = NSTextAlignmentCenter;
    noteDetail.font = Kfont(14);
    noteDetail.numberOfLines = 0;
    [self.view addSubview:noteDetail];
    
    OperateButton *button = [[OperateButton alloc] initWithFrame:CGRectMake(ScreenX375(13), ScreenX375(370), SCREEN_WIDTH - ScreenX375(26), ScreenX375(44))];
    [button setTitle:@"确定" forState:UIControlStateNormal];
    [button addTarget:self action:@selector(sure) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button];
}

- (void)sure {
    OrderListViewController *vc = [[OrderListViewController alloc] init];
    [self.navigationController pushViewController:vc animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
